#!/bin/sh -e
# Copyright (c) 2016 The crouton Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

if [ -z "$release" ]; then
    echo "trusty"
    echo "utopic"
    exit 0
fi

# Need dbus in cli-extra to bring in systemd-services.
snapshot "$release" cli-extra

# logind should be running.
host enter-chroot -n "$release" -u root pidof -c systemd-logind

# systemd cgroup should be set up.
host enter-chroot -n "$release" test -f /sys/fs/cgroup/systemd/cgroup.procs

host delete-chroot -y "$release"
